package com.luty.test;

import org.I0Itec.zkclient.ZkClient;
import org.I0Itec.zkclient.serialize.SerializableSerializer;
import org.apache.zookeeper.data.Stat;

/**
 * Created by liuyunxin on 2017/7/1.
 */
public class getData {
    public static void main(String[] args){
        String ZKServers = "0.0.0.0:2181,0.0.0.0:2182,0.0.0.0:2183";

        ZkClient zkClient = new ZkClient(ZKServers, 50000, 50000, new SerializableSerializer());

        Stat stat = new Stat();

        User user = zkClient.readData("/server/com.luty.rpc.service.api.HelloService", stat);

        System.out.println(user.getName());

        System.out.println(stat);

    }
}
